#include<bits/stdc++.h>
# define rep(i, j, k) for (int i = j; i <= k; ++i)
using namespace std;

int n, m, q, s, t;
int hd[605], to[1000005], nxt[1000005], w[1000005], c[1000005], etimer = 1;
int lv[605], stk[1000005], l, r, instk[605], now[605], cur[605];
int cst[305];
void addedge(int u, int v, int we, int ce){to[++etimer] = v, nxt[etimer] = hd[u], hd[u] = etimer; w[etimer] = we, c[etimer] = ce;}
bool bfs()
{
    rep(i, 1, t) lv[i] = 2000000000;
    memset(instk, 0, sizeof(instk));
    lv[s] = 0, stk[l = r = 1] = s, instk[s] = 1;
    while (l <= r)
    {
        int u = stk[l++]; instk[u] = 0;
        for (int i = hd[u]; i; i = nxt[i]) if (w[i] && lv[to[i]] > lv[u] + c[i]) {lv[to[i]] = lv[u] + c[i]; if (!instk[to[i]]) stk[++r] = to[i], instk[to[i]] = 1;}
    }
    return lv[t] < 2000000000;
}
bool dfs(int u)
{
    if (u == t) return true;
    now[u] = 1;
    for (int i = cur[u]; i; i = nxt[i])
    {
        cur[u] = i;
        if (lv[to[i]] != lv[u] + c[i] || !w[i] || now[to[i]]) continue;
        if (dfs(to[i])) {--w[i], ++w[i ^ 1]; return true;}
    }
    return false;
}
void dinic()
{
    rep(i, 1, n) cst[i] = 2000000000;
    rep(i, 1, n) if (bfs())
    {
        memset(now, 0, sizeof(now));
        rep(i, 1, t) cur[i] = hd[i];
        dfs(s); cst[i] = cst[i - 1] + lv[t];
    }
}
signed main()
{
    freopen("journey.in", "r", stdin);
    freopen("journey.out", "w", stdout);
    ios::sync_with_stdio(false); cin.tie(0), cout.tie(0);
    cin >> n >> m >> q;
    s = 2 * n + 1, t = 2 * n + 2;
    rep(i, 1, m) {int u, v, w; cin >> u >> v >> w; addedge(u, n + v, 400, w), addedge(n + v, u, 0, -w);}
    rep(i, 1, n) addedge(s, i, 1, 0), addedge(i, s, 0, 0), addedge(n + i, t, 1, 0), addedge(t, n + i, 0, 0), addedge(n + i, i, 400, 0), addedge(i, n + i, 0, 0);
    dinic();
    rep(i, 1, q)
    {
        int c, ans = 2000000000; cin >> c;
        rep(i, 0, n) ans = min(ans, cst[i] + (n - i) * c);
        cout << ans << '\n';
    }
    return 0;
}
